package com.wn.common.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import javax.validation.constraints.*;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="Order",description = "订单实体类")
public class Order {
    @ApiModelProperty(name="id",value="订单id")
    private Integer id;
    //方案名称+用户id
    @ApiModelProperty(name="orderName",value="订单名称")
    @NotBlank(message = "请填写订单名称！")
    private String orderName;

    @ApiModelProperty(name="orderPaytype",value="支付方式")
    private String orderPaytype;

    @ApiModelProperty(name="orderPaynumber",value="支付订单编号")
    private String orderPaynumber;

    @ApiModelProperty(name="orderPaymoney",value="支付金额")
    @NotBlank(message = "计算支付金额异常")
    private BigDecimal orderPaymoney;


    @ApiModelProperty(name="orderPaytime",value="支付时间")
    private Date orderPaytime;

    @ApiModelProperty(name="producrtcount",value="产品总数")
    @Min(value=1,message = "产品总数至少为1！")
    private Integer productcount;

    @ApiModelProperty(name="travelAngencyId",value="旅行社id")
    private Integer travelAngencyId;

    @ApiModelProperty(name="travelAngency",value="旅行社",hidden = true)
    private TravelAngency travelAngency;

    @ApiModelProperty(name="orderTravelend",value="旅行结束时间")
    @NotNull(message = "旅行时间不得为空！")
    private Date orderTravelend;
    //出发日期
    @ApiModelProperty(name="orderTraveltime",value="旅行开始时间")
    @NotNull(message = "旅行时间不得为空")
    private Date orderTraveltime;

    @ApiModelProperty(name="orderStatus",value="订单状态")
    private String orderStatus;

    private Integer createUserId ;

    private Date createTime ;

    private Date updateTime;

    private Integer updateUserId;

    @ApiModelProperty(name="isdeleted",value="订单逻辑删除")
    private String isdeleted;

    @ApiModelProperty(name="appointmentId",value="预约详情id")
    private Integer appointmentId;

   @ApiModelProperty(name="appointment",value="预约详情")
    private Appointment appointment;

    private Integer travelerOrderId;

    @ApiModelProperty(name="travellers", value="下单旅客",hidden = true)
    private List<Traveller> travellers;
    //出发城市编号
    private Integer fromCityRegionCode;

    //酒店id
    private Integer hotelId;


    private  City city;
    private  Hotel hotel;
    private Scheme scheme;
    public Order(String orderPaynumber, BigDecimal orderPaymoney) {
        this.orderPaynumber = orderPaynumber;
        this.orderPaymoney = orderPaymoney;
    }
}


